package lcsPD;

import static org.junit.Assert.*;

import org.junit.Test;

public class LcsPDTest {
	private String s1, s2;

	@Test
	public void test() {
		s1 = "";
		s2 = "";
		String result = "";
		assertTrue("La LCS non funziona", LcsPD.findLcs(s1, s2).equals(result));
		
		s1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
		s2 = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
		result = "";
		assertTrue("La LCS non funziona", LcsPD.findLcs(s1, s2).equals(result));

		s1 = "abc";
		s2 = "bac";
		result = "bc";
		assertTrue("La LCS non funziona", LcsPD.findLcs(s1, s2).equals(result));

		s1 = "raffaelecafaro";
		s2 = "francescodemartino";
		result = "faecaro";
		assertTrue("La LCS non funziona", LcsPD.findLcs(s1, s2).equals(result));
	}

}
